private class EventLogsManagerController.SchemaFactoryErrorHandler extends Object implements ErrorHandler
ErrorHandler
for creating
a specific error handler for the SchemaFactory
object.
It will be used by the factory to manage SAXParseException
exceptions that may occur during the creation of the Schema
object
(validateEventLog()
method).
This class will report to the user warnings and errors that may occur during the
creation of the Schema
object and stop the validation process if an error
occurs, throwing a SAXException
.
ErrorHandler
,
SchemaFactory
,
Schema
,
SAXException
Modifier | Constructor and Description |
---|---|
private |
SchemaFactoryErrorHandler() |
Modifier and Type | Method and Description |
---|---|
private void |
addInfo(StringBuffer message,
SAXParseException exception)
This method reads the line number, column number and message of the passed
SAXParseException and then append this information to the passed
StringBuffer . |
void |
error(SAXParseException exception)
Receive notification of a recoverable error.
|
void |
fatalError(SAXParseException exception)
Receive notification of a non-recoverable error.
|
void |
warning(SAXParseException exception)
Receive notification of a warning.
|
public void warning(SAXParseException exception) throws SAXException
The method asks to the View to show a Warning dialog with the warning information in it.
warning
in interface ErrorHandler
exception
- the warning information encapsulated in a SAX parse exceptionSAXException
- this method takes and manages the exception received and does not throw it to the callerSAXParseException
,
SAXException
public void error(SAXParseException exception) throws SAXException
The method asks to the View to show an Error dialog with the error information in it
and then throws a SAXParseException
to tell to the caller method that it has to stop.
error
in interface ErrorHandler
exception
- the error information encapsulated in a SAX parse exception.SAXException
- this method takes and manages the exception received and then throws it to the callerSAXParseException
,
SAXException
public void fatalError(SAXParseException exception) throws SAXException
The method asks to the View to show an Error dialog with the error information in it
and then throws a SAXParseException
to tell to the caller method that it has to stop.
fatalError
in interface ErrorHandler
exception
- the error information encapsulated in a SAX parse exception.SAXException
- this method takes and manages the exception received and then throws it to the callerSAXParseException
,
SAXException
private void addInfo(StringBuffer message, SAXParseException exception)
SAXParseException
and then append this information to the passed
StringBuffer
.message
- the StringBuffer
where to append the informationexception
- the SAXParseException
where to read the informationStringBuffer
,
SAXParseException